package com.xsd.vistor.shopDemo;

/**
 * @Description: 商品 水果
 * @Author: zhoufuzong
 * @Created: 2021-03-10 21:41:06
 * @Version: 1.1.0
 */

public class Fruit extends ItemElement {
    private double price;
    private int amt ;

    public double getPrice() {
        return price;
    }

    public int getAmt() {
        return amt;
    }

    public Fruit(double price, int amt) {
        this.price = price;
        this.amt = amt;
    }

    @Override
    public double accpet(ShoppingCartVistor vistor) {
        return vistor.visitFruit(this);

    }
}
